Revert the previous change to this function, clarify the docs instead.
authorMatthias Clasen <mclasen@redhat.com>
Tue, 11 May 2004 17:26:48 +0000 (17:26 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Tue, 11 May 2004 17:26:48 +0000 (17:26 +0000)
2004-05-11  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkuimanager.c (gtk_ui_manager_get_widget): Revert the
previous change to this function, clarify the docs instead.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkuimanager.c

index 9381c27db7afe604b312fb17debac6139a5d95be..ae0c9ca9f7f1e31e42b33b1774c23da2a4010348 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-05-11  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkuimanager.c (gtk_ui_manager_get_widget): Revert the
+       previous change to this function, clarify the docs instead.
+
        * gtk/gtkcombobox.c (gtk_combo_box_list_setup): Use
        GTK_SELECTION_BROWSE.
 
index 9381c27db7afe604b312fb17debac6139a5d95be..ae0c9ca9f7f1e31e42b33b1774c23da2a4010348 100644 (file)
@@ -1,5 +1,8 @@
 2004-05-11  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkuimanager.c (gtk_ui_manager_get_widget): Revert the
+       previous change to this function, clarify the docs instead.
+
        * gtk/gtkcombobox.c (gtk_combo_box_list_setup): Use
        GTK_SELECTION_BROWSE.
 
index 9381c27db7afe604b312fb17debac6139a5d95be..ae0c9ca9f7f1e31e42b33b1774c23da2a4010348 100644 (file)
@@ -1,5 +1,8 @@
 2004-05-11  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkuimanager.c (gtk_ui_manager_get_widget): Revert the
+       previous change to this function, clarify the docs instead.
+
        * gtk/gtkcombobox.c (gtk_combo_box_list_setup): Use
        GTK_SELECTION_BROWSE.
 
index 9381c27db7afe604b312fb17debac6139a5d95be..ae0c9ca9f7f1e31e42b33b1774c23da2a4010348 100644 (file)
@@ -1,5 +1,8 @@
 2004-05-11  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkuimanager.c (gtk_ui_manager_get_widget): Revert the
+       previous change to this function, clarify the docs instead.
+
        * gtk/gtkcombobox.c (gtk_combo_box_list_setup): Use
        GTK_SELECTION_BROWSE.
 
index cfbfe4b217e2c5dad96b67f0eb9f9aacc8538901..7248628f082a5cf6e1a2c98a9a06e72d9e1fc455 100644 (file)
@@ -689,6 +689,9 @@ gtk_ui_manager_get_accel_group (GtkUIManager *self)
  * separated by '/'. Elements which don't have a name or action attribute in 
  * the XML (e.g. &lt;popup&gt;) can be addressed by their XML element name 
  * (e.g. "popup"). The root element ("/ui") can be omitted in the path.
+ *
+ * Note that the widget found by following a path that ends in a &lt;menu&gt;
+ * element is the menuitem to which the menu is attached, not the menu itself.
  * 
  * Return value: the widget found by following the path, or %NULL if no widget
  *   was found.
@@ -715,14 +718,7 @@ gtk_ui_manager_get_widget (GtkUIManager *self,
   if (node == NULL)
     return NULL;
 
-  if (NODE_INFO (node)->type == NODE_TYPE_MENU)
-    {
-      GtkWidget *proxy = NODE_INFO (node)->proxy;
-
-      return gtk_menu_item_get_submenu (GTK_MENU_ITEM (proxy));
-    }
-  else
-    return NODE_INFO (node)->proxy;
+  return NODE_INFO (node)->proxy;
 }
 
 static void